import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, Params} from '@angular/router';

@Component({
  selector: 'app-list-details',
  templateUrl: './list-details.component.html',
  styleUrls: ['./list-details.component.css']
})
export class ListDetailsComponent implements OnInit {
  public id: any;
  public state: any;

  constructor(private route: ActivatedRoute,) {
  }

  ngOnInit() {
    this.route.queryParams
      .subscribe((params: Params) => {
        this.id = params['id'];
        this.state = params['state'];
        console.log(this.id);
        console.log(this.state);
      })
  }

}
